import 'package:flutter/material.dart';
import 'package:hixing_app/models/options_model.dart';
import 'package:hixing_app/widgets/custom_switcher.dart';

class TestSwitcher extends StatefulWidget {
  @override
  _TestSwitcherState createState() => _TestSwitcherState();
}

class _TestSwitcherState extends State<TestSwitcher> {
  List<OptionsModel> testList = [
    OptionsModel(label: "线测试测试条", value: 0),
    OptionsModel(label: "测阿打发是是是是", value: 1),
    OptionsModel(label: "文锁定案", value: 2),
    OptionsModel(label: "文锁定案", value: 3),
    OptionsModel(label: "文锁定案", value: 4),
    OptionsModel(label: "文锁定案", value: 5),
  ];

  @override
  Widget build(BuildContext context) {
    return Scaffold(
        appBar: AppBar(
          title: Text('模板'),
        ),
        body: Column(
          children: [
            Container(
              height: 42,
              padding: EdgeInsets.symmetric(horizontal: 20),
              child: CustomSwitcher(
                switchList: testList,
                onTap: (data) {},
              ),
            )
          ],
        ));
  }
}
